﻿using System;
using System.Collections.Generic;

namespace HYCodeBase.WinForm.WinFormRemindSuit
{
	internal class FormInformationBean : ControlInformationBean
	{
		internal List<ControlInformationBean> LstAllControls
		{
			get
			{
				return this.m_lstAllControls;
			}
			private set
			{
				this.m_lstAllControls = value;
			}
		}

		internal FormInformationBean(string inputName, List<AttributeInformationBean> lstInputAttribute, List<ControlInformationBean> lstInputControls) : base(inputName, lstInputAttribute)
		{
			base.StrName = inputName;
			this.m_lstAllControls = lstInputControls;
		}

		internal FormInformationBean(string inputName, List<AttributeInformationBean> lstInputAttribute) : base(inputName, lstInputAttribute)
		{
		}

		internal FormInformationBean(string inputName) : base(inputName)
		{
		}

		internal void AddOneControlBean(ControlInformationBean inputControlBean)
		{
			this.LstAllControls.Add(inputControlBean);
		}

		internal ControlInformationBean GetControlBeanByName(string inputName)
		{
			ControlInformationBean result = null;
			foreach (ControlInformationBean controlInformationBean in this.m_lstAllControls)
			{
				if (controlInformationBean.StrName == inputName)
				{
					result = controlInformationBean;
					break;
				}
			}
			return result;
		}

		private List<ControlInformationBean> m_lstAllControls = new List<ControlInformationBean>();
	}
}
